NAME Comparison Operators SYNOPSIS .op. value1 value2 DESCRIPTION These operators are used to compare two parameters: .eq. Equal .ne. Not Equal .gt. Greater Than .lt. Less Than .ge. Greater Than or Equal To .le. Less Than or Equal To If both parameters are legal integers, an integer comparison is performed. If one or both parameters are not integers, a string comparison is performed. These comparison commands may be used to test the return value from a previous command. It is important to note, however, that the comparison itself produces a return value and will overwrite "$?". For this reason, the return code should be saved into a temporary variable before a series of comparisons are performed: command_x set temp $? # save the result if .lt. $temp 0 then echo "A serious error has occurred." endif if .eq. $temp 0 then echo "Everything is ok" endif if .gt. $temp 0 then echo "command_x returned a value of" $temp endif RETURN CODES <0 Error 0 True 1 False